
package com.idealighter.game.games.errenniuniu.handler;

import com.idealighter.game.core.annotation.ResMsgHandler;
import com.idealighter.game.games.errenniuniu.message.ReqShowdownMsg;
import com.idealighter.game.message.core.ResMessage;
import com.idealighter.game.robot.core.Player;
import com.idealighter.game.robot.handler.ResMessageHandler;
import com.idealighter.utils.code.RandCodeUtil;

import java.util.concurrent.TimeUnit;


@ResMsgHandler(502218)
public class ResDealCardsHandler implements ResMessageHandler {

  @Override
  public void action(Player player, ResMessage message) {
    // ResDealCardsMsg msg = (ResDealCardsMsg) message;
    // 随机1到3秒摊牌
    player.schedule(() -> player.sendMsg(new ReqShowdownMsg()), RandCodeUtil.random(1, 3),
        TimeUnit.SECONDS);
  }
}
